﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Sunny.UI;

namespace CoreShop.App
{
    public partial class KsKeyBoard : UserControl
    {
        private UITextBox _input;
        public KsKeyBoard()
        {
            InitializeComponent();
        }
        
        public UITextBox InputControl
        {
            get
            {
                return _input;
            }
            set
            {
                _input = value;
            }
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            Form Frm = this.FindForm();
            if (Frm is BaseForm)
            {
                (Frm as BaseForm).DoOK();
            }
        }

        private void lbBack_Click(object sender, EventArgs e)
        {
            try
            {
                //_input.Focus();
                SendKeys.Send("\b");
            }
            catch { }
        }

        private void LabelClicked(object sender, EventArgs e)
        {
            string sName = (sender as Label).Tag.ToString();
            SendKeys.Send(sName);
        }

        private void uiLabel5_Click(object sender, EventArgs e)
        {
            string sName = (sender as UILabel).Tag.ToString();
            SendKeys.Send(sName);
        }
    }
}
